package fr.emse.tatiana.replayable.analysis;

import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.ui.IEditorInput;

import fr.emse.tatiana.display.BadDisplayFile;

public class GraphAnalysisInput extends AbstractAnalysisInput implements IEditorInput {

	public GraphAnalysisInput(IFile file) {
		super(file);
	}

	public GraphAnalysisInput(IProject p) {
		super(p);
	}
	
	@Override
	public IAnalysis getModel() throws BadDisplayFile {
		if (model==null) {
			if (file == null) {
				model = new GraphAnalysis("UntitledAnalysis"+(ID++),p);
			} else {
				model = new GraphAnalysis(file);
			}
		}
		return model;
	}
	

}
